using System;
using System.Collections.Generic;
using System.Text;
using XinBang.Entity;
using XinBang.DAL;

namespace XinBang.BLL
{
    public class RuleBL
    {
        private IRuleDA<Rule> rd = BusinessLogicFactory.GetRuleDA();

        public IList<Rule> GetAllRules()
        {
            return rd.GetAllRules();
        }

        public Rule GetRuleById(int p)
        {
            return rd.Get(p);
        }
        public void UpdateRule(Rule rule)
        {
            rd.Update(rule);
        }
        public void InsertRule(Rule rule)
        {
            rd.Insert(rule);
        }
        public void DeleteRule(Rule rule)
        {
            rd.Delete(rule);
        }
    }
}
